<template>
  <div class="charts" ref="charts">

  </div>
</template>

<script>
import * as echarts from 'echarts'
export default {
  name: "barCharts",
  mounted() {
    let lineCharts = echarts.init(this.$refs.charts)
    lineCharts.setOption({
      xAxis: {
        // 隐藏x轴 
        show: false,
        type: 'category'
      },
      yAxis: {
        show: false,

      },
      series: [{
        type: 'bar',
        data: [10, 7, 88, 12, 88, 9, 55, 88, 44, 33, 22, 11],
        color: 'cyan'
      }],
      //布局调试
      grid: {
        left: 0,
        top: 0,
        right: 0,
        bottom: 0
      },
      tooltip: {
        //鼠标放在图上时有提示
      }
    })
  }
}
</script>


<style scoped>
.charts {
  width: 100%;
  height: 100%;
}
</style>